Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow show() to trigger while ghost-text is visible #796

Merged

Conversation

jessevdp
Copy link
Contributor

@jessevdp jessevdp commented Dec 27, 2024

This is a fix for #762: an issue where manually triggering show() via a key combo (for those of us that don't use auto_show) isn't possible while ghost text is visible.

Note that the current "fix" is very low effort. I simply looked at the definition for cmp.is_visible() and decided to just copy one half of that function without the "ghost text is visible part". This is on purpose! You can interpret this as a draft PR. I'd be glad to refactor this a bit even if that only means splitting a cmp.is_menu_visible() helper function. But...

...I first want to make sure that this fix is desired. I can verify after running this locally that this fixes my issue. But I'm unsure if this breaks anything else.

I'm happy to polish this further, write a test, you name it! Let me know 😆

Thanks for all of the work on blink.cmp. Thanks to it I now finally have a completion setup that I'm happy with!

@jessevdp jessevdp changed the title Don't prevent show() when ghost-text is visible Allow show() to trigger when ghost-text is visible Dec 27, 2024
@jessevdp jessevdp marked this pull request as draft December 27, 2024 08:56
@jessevdp jessevdp changed the title Allow show() to trigger when ghost-text is visible Allow show() to trigger while ghost-text is visible Dec 27, 2024
@Saghen Saghen marked this pull request as ready for review December 27, 2024 15:41
@Saghen Saghen merged commit 59d6b4f into Saghen:main Dec 27, 2024
@Saghen
Copy link
Owner

Saghen commented Dec 27, 2024

Looks good as is, thanks!

@jessevdp jessevdp deleted the fix-manual-menu-show-while-ghost-text-is-visible branch December 28, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants